package com.Object.EqualsExercise;

/**
 * @Author 小闽
 * @Date 2024/8/14 9:41
 * @PackageName: com.Object.EqualsExercise
 * @ClassName: EqualsExercise01
 * @Description: equals重写
 * @Version 1.0
 */
public class EqualsExercise01 {
    /**
     * 判断两个Person对象的内容是否相等，如果两个Person对象的各个属性值都一样，
     * 则返回true,反之返回false
     */
    public static void main(String[] args) {
        Person person1 = new Person("jack", 20, '男');
        Person person2 = new Person("jack", 20,'男');
        System.out.println(person1.equals(person2));
    }
}


